Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

401
Views
NodeJS include require(jquery) etc in .js file without interfering with standard javascript->html interactions

Working on a project for my internship, after a basic proof of concept I am now trying to get a nodeJS program that can call in functions from a .js file linked to a company intranet website and execute them.

I'm running into an issue with having nodeJS read the .js file/call in the proper functions while also ensuring that the front end/html still runs as intended. The .js file includes lines of jquery which nodeJS requires the use of something like

var $ = require('jquery');

in order for it to run. However, if I include this line (or, after some checking, ANY require('') statement, even if the variable assigned to the require is unused) in the .js, it causes some sort of break in the normal operations so that the front-end html site no longer displays/queries data properly.

Unfortunately I don't have a minimum code example to show so mainly looking to spitball ideas from anyone on if they've had similar problems. Possible solution would be to have a separate .js file with all the same functionality but re-written/adjusted to work for nodeJS, but we want to avoid that if possible

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!